package com.lagou;

import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.*;

import java.io.IOException;

public class DubboPureMain {

    public static void main(String[] args) throws IOException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ProviderConfiguration.class);
        context.start();
        System.in.read();
    }

    @Configuration
    @ComponentScan(basePackages = "com.lagou.service.impl")
    @PropertySource("classpath:/dubbo.properties")
    @EnableDubbo
    static class ProviderConfiguration{
//        @Bean
//        public RegistryConfig registryConfig(){
//            RegistryConfig registryConfig = new RegistryConfig();
//            registryConfig.setAddress("zookeeper://47.93.232.149:2181");
//            return registryConfig;
//        }
    }
}
